﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BISPOS.Repository
{
    public class LoanRepository
    {
        BISPOS.BISPOSDataClassesDataContext db = new BISPOSDataClassesDataContext();
        public IEnumerable<Supplier> AllLoaners()
        {
            return db.Suppliers.Where(x => x.Bills.Any(y => y.IsCredit));
        }
        public IEnumerable<Customer> AllDeptor()
        {
            return db.Customers.Where(x => x.Invoices.Any(y => y.PaymentType.IsCredit));
        }
    }
}
